﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Models.Vendors>" %>
<%@ Import Namespace="CRM.Models" %>

<% Html.DevExpress().ComboBox(settings =>
   {
       settings.Name = "Models";
       settings.CallbackRouteValues =
          new { Controller = "EquipmentCombobox", Action = "ModelsPartial" };
       settings.Properties.CallbackPageSize = 10;
       settings.Properties.TextField = "Model";
       
       settings.Properties.ValueField = "IdEquipment";
       settings.Properties.EnableCallbackMode = true;
       settings.Properties.ClientSideEvents.BeginCallback = "function (s, e) {  e.customArgs['Vendors'] = Vendors.GetValue(); }";
    //   settings.Properties.ClientSideEvents.SelectedIndexChanged = "function (s, e) {alert(Models.GetValue()); }";
   }).BindList(Model.Equipments.ToList()).GetHtml(); %>